home *** CD-ROM | disk | FTP | other *** search
- Subject: v22i055: NN Newsreader, release 6.4, Part21/21
- Newsgroups: comp.sources.unix
- Approved: rsalz@uunet.UU.NET
- X-Checksum-Snefru: 3a5fcde9 de754474 a8ece4e1 121f94b6
-
- Submitted-by: "Kim F. Storm" <storm@texas.dk>
- Posting-number: Volume 22, Issue 55
- Archive-name: nn6.4/part21
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then feed it
- # into a shell via "sh file" or similar. To overwrite existing files,
- # type "sh file -c".
- # The tool that generated this appeared in the comp.sources.unix newsgroup;
- # send mail to comp-sources-unix@uunet.uu.net if you want that tool.
- # Contents: Makefile articles.h conf/m-convex.h conf/m-template.h
- # conf/s-hpux6-5.h conf/s-sgi4D.h conf/s-xenix386.h format.awk
- # help/help.extended help/help.map help/help.menu help/help.more
- # help/help.sort inews/README man/nnpost.1 man/nnspew.8
- # man/nnstats.1m man/nntidy.1 man/nnusage.1m menu.h news.h nnmail.c
- # options.h pack_subject.c proto.h routes.sample term.h vararg.h
- # Wrapped by storm@texas.dk on Sun May 6 18:20:25 1990
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- echo If this archive is complete, you will see the following message:
- echo ' "shar: End of archive 21 (of 22)."'
- if test -f 'Makefile' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'Makefile'\"
- else
- echo shar: Extracting \"'Makefile'\" \(2021 characters\)
- sed "s/^X//" >'Makefile' <<'END_OF_FILE'
- X#
- X# Makefile for nn release 6.4
- X#
- X# Specify your favourite compiler, preprocessor, and compiler flags:
- X#
- X# Some alternatives for CPP might be /lib/cpp and $(CC) -P
- X# Common values for CFLAGS are '-O -s' or '-g'
- X#
- X
- XCC = cc
- XCPP = $(CC) -E
- XCFLAGS = -g
- XMAKE = make
- X
- X#
- X# Before compiling, read the instructions in the file INSTALLATION!
- X# -----------------------------------------------------------------
- X#
- X# make all compile programs
- X# make install install programs
- X# make initdb initialize database
- X# make clean remove all make'd files from source directory
- X#
- X# no changes are needed below this line
- X#
- X
- XSHELL = /bin/sh
- X
- Xall: ymakefile
- X $(MAKE) $(MFLAGS) -f ymakefile all
- X
- Xtouch: ymakefile
- X $(MAKE) -f ymakefile -t all
- X
- Xdbg: ymakefile
- X $(MAKE) $(MFLAGS) -f ymakefile nn1
- X
- Xnn: ymakefile
- X $(MAKE) $(MFLAGS) -f ymakefile nn
- X
- Xmaster: ymakefile
- X $(MAKE) $(MFLAGS) -f ymakefile master
- X
- Xlint: ymakefile
- X $(MAKE) -f ymakefile lint
- X
- Xinstall: ymakefile
- X $(MAKE) $(MFLAGS) -f ymakefile install
- X
- Xinitdb: ymakefile
- X $(MAKE) $(MFLAGS) -f ymakefile initdb
- X
- Xonline: ymakefile
- X $(MAKE) $(MFLAGS) -f ymakefile online.manual
- X
- Xclient: ymakefile
- X $(MAKE) $(MFLAGS) -f ymakefile client
- X
- Xinstall.client: ymakefile
- X $(MAKE) $(MFLAGS) -f ymakefile install.client
- X
- Xymakefile: Makefile xmakefile config.h
- X cp xmakefile MF.c
- X $(CPP) -DCOMPILER="$(CC)" -DPREPROC="$(CPP)" \
- X -DCDEBUG="$(CFLAGS)" -Iconf MF.c | \
- X sed -e '1,/MAKE WILL CUT HERE/d' \
- X -e '/^#/d' \
- X -e '/^[ \f ]$$/d' \
- X -e '/^[ /]*[*]/d' | \
- X sed -n -e '/^..*$$/p' > ymakefile
- X rm -f MF.c
- X
- X#
- X# clean up
- X# Will remove object and executeable files.
- X#
- X
- Xclean: ymakefile
- X make -f ymakefile clean
- X rm -f *.o *~ ymakefile
- X
- X#
- X# distribution
- X#
- X
- Xdistrib: man/nn.1.D
- X [ -d DIST ] || mkdir DIST
- X rm DIST/Part.*
- X makekit -m -k30 -s55000 -nDIST/Part.
- X
- Xtar: man/nn.1.D
- X chmod +x FILES
- X rm -f /tmp/nn64tar*
- X tar cf /tmp/nn64tar `FILES`
- X cd /tmp && compress nn64tar
- X
- Xsplit: tar
- X rm -f /tmp/nn64z*
- X cd /tmp && bsplit -b40000 -pnn64z -v < nn64tar.Z
- X
- Xman/nn.1.D: man/nn.1
- X sh SPLITNN1
- X
- END_OF_FILE
- if test 2021 -ne `wc -c <'Makefile'`; then
- echo shar: \"'Makefile'\" unpacked with wrong size!
- fi
- # end of 'Makefile'
- fi
- if test -f 'articles.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'articles.h'\"
- else
- echo shar: Extracting \"'articles.h'\" \(1431 characters\)
- sed "s/^X//" >'articles.h' <<'END_OF_FILE'
- X/*
- X * (c) Copyright 1990, Kim Fabricius Storm. All rights reserved.
- X *
- X * Memory handling
- X */
- X
- X/* article headers */
- X
- Xarticle_number n_articles;
- Xarticle_header **articles;
- X
- X
- Xtypedef struct thunk {
- X char *this_thunk;
- X struct thunk *next_thunk;
- X long thunk_size;
- X} thunk;
- X
- X
- Xtypedef struct {
- X thunk *sm_cur_t;
- X int sm_size;
- X char *sm_next;
- X} string_marker;
- X
- X
- Xtypedef struct {
- X string_marker mm_string;
- X thunk *mm_cur_t;
- X int mm_size;
- X article_header *mm_next;
- X long mm_nart;
- X} memory_marker;
- X
- X
- Xextern article_header *alloc_art();
- Xextern char *alloc_str();
- X
- X/* flags to access_group */
- X
- X#define ACC_ALSO_CROSS_POSTINGS FLAG(1) /* */
- X#define ACC_DONT_SORT_ARTICLES FLAG(2) /* */
- X#define ACC_DONT_SPLIT_DIGESTS FLAG(3) /* only full digest */
- X#define ACC_ALSO_FULL_DIGEST FLAG(4) /* also full digest */
- X#define ACC_EXTRA_ARTICLES FLAG(5) /* add to current menu */
- X#define ACC_ALSO_READ_ARTICLES FLAG(6) /* */
- X#define ACC_ONLY_READ_ARTICLES FLAG(7) /* unread are already collected */
- X#define ACC_MERGED_MENU FLAG(8) /* set a_group field */
- X#define ACC_ORIG_NEWSRC FLAG(9) /* get previously unread articles */
- X#define ACC_VALIDATE_ONLY FLAG(10) /* don't save articles */
- X#define ACC_SPEW_MODE FLAG(11) /* */
- X#define ACC_ON_SENDER FLAG(12) /* match on sender (only) */
- X#define ACC_ON_SUBJECT FLAG(13) /* match on subject (also) */
- X#define ACC_DO_KILL FLAG(14) /* do auto-kill/select */
- END_OF_FILE
- if test 1431 -ne `wc -c <'articles.h'`; then
- echo shar: \"'articles.h'\" unpacked with wrong size!
- fi
- # end of 'articles.h'
- fi
- if test -f 'conf/m-convex.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'conf/m-convex.h'\"
- else
- echo shar: Extracting \"'conf/m-convex.h'\" \(1212 characters\)
- sed "s/^X//" >'conf/m-convex.h' <<'END_OF_FILE'
- X/************** Machine (and compiler) dependent definitions. **************
- X *
- X * Define appropriate types for the following ranges of integer
- X * variables. These are processor & compiler dependent, but the
- X * distributed definitions will probably work on most systems.
- X */
- X
- X
- X
- X/* MACHINE TYPE DEFINED TYPE VALUE RANGE */
- X
- Xtypedef unsigned char int8; /* 0 .. 255 */
- Xtypedef short int16; /* -10,000 .. 10,000 */
- Xtypedef long int32; /* -100,000 .. 100,000 */
- Xtypedef unsigned long uint32; /* 0 .. 2^31-1 */
- X
- X
- X/*
- X * Define NO_VARARGS if the varargs feature is not available
- X *
- X * Also define NO_VARARGS if the vprintf/vsprintf routines are not
- X * available (however, this will only by safe on some machines, like
- X * the VAX).
- X *
- X */
- X
- X#define NO_VARARGS
- X
- X/*
- X * Define STRCSPN if the strcspn() function is not available.
- X */
- X
- X#define STRCSPN /* */
- X
- X/*
- X * Define NO_SIGINTERRUPT on BSD based systems which don't have
- X * a siginterrupt() function, but provides an SV_INTERRUPT flag
- X * in <signal.h>.
- X */
- X
- X#define NO_SIGINTERRUPT /* */
- X
- X
- X/*
- X * Define NETWORK_BYTE_ORDER if the machine's int32's are
- X * already in network byte order, i.e. m68k based.
- X */
- X
- X#define NETWORK_BYTE_ORDER /* */
- END_OF_FILE
- if test 1212 -ne `wc -c <'conf/m-convex.h'`; then
- echo shar: \"'conf/m-convex.h'\" unpacked with wrong size!
- fi
- # end of 'conf/m-convex.h'
- fi
- if test -f 'conf/m-template.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'conf/m-template.h'\"
- else
- echo shar: Extracting \"'conf/m-template.h'\" \(2259 characters\)
- sed "s/^X//" >'conf/m-template.h' <<'END_OF_FILE'
- X
- X/************** Machine (and compiler) dependent definitions. **************
- X *
- X * Define appropriate types for the following ranges of integer
- X * variables. These are processor & compiler dependent, but the
- X * distributed definitions will probably work on most systems.
- X */
- X
- X
- X
- X/* MACHINE TYPE DEFINED TYPE VALUE RANGE */
- X
- Xtypedef unsigned char int8; /* 0 .. 255 */
- Xtypedef short int16; /* -10,000 .. 10,000 */
- Xtypedef long int32; /* -100,000 .. 100,000 */
- Xtypedef unsigned long uint32; /* 0 .. 2^31-1 */
- X
- X
- X/*
- X * Define NO_VARARGS if the varargs feature is not available.
- X *
- X * Also define NO_VARARGS if the vprintf/vsprintf routines are not
- X * available (however, this will only by safe on some machines, like
- X * the VAX).
- X *
- X * Defining NO_VARARGS in the m- file should only be done for
- X * architectures which does not support it in general, or where
- X * a majority of the systems available on that architecture
- X * doesn't have it. Otherwise, it should be defined in the
- X * s- file, because this is primarily OS dependent.
- X *
- X * NO_VARARGS can be overruled by defining HAVE_VARARGS in the s-
- X * file.
- X */
- X
- X/* #define NO_VARARGS /* unless HAVE_VARARGS */
- X
- X/*
- X * Define STRCSPN if the strcspn() function is not available.
- X */
- X
- X/* #define STRCSPN /* */
- X
- X/*
- X * Define NO_SIGINTERRUPT on BSD based systems which don't have
- X * a siginterrupt() function, but provides an SV_INTERRUPT flag
- X * in <signal.h>.
- X */
- X
- X/* #define NO_SIGINTERRUPT /* */
- X
- X
- X#ifdef NETWORK_DATABASE
- X
- X/*
- X * Define NETWORK_BYTE_ORDER if the machine's int32's are
- X * already in network byte order, i.e. m68k based.
- X */
- X
- X#define NETWORK_BYTE_ORDER /* */
- X
- X/*
- X * OTHERWISE provide the functions/macros ntohl/htonl to
- X * convert longs from and to network byte order
- X */
- X
- X#ifndef NETWORK_BYTE_ORDER
- X
- X/*
- X * Include appropriate files or define macroes or functions (include them
- X * in data.c) to convert longs and shorts to and from network byte order.
- X */
- X
- X/*
- X * This will work on most BSD based systems...
- X */
- X
- X#include <netinet/in.h>
- X
- X/*
- X * Otherwise, define something appropriate below
- X */
- X
- X#define htonl(l) ... /* host long to network long */
- X#define ntohl(l) ... /* network long to host long */
- X
- X#endif /* not NETWORK BYTE ORDER */
- X
- X#endif /* NETWORK DATABASE */
- END_OF_FILE
- if test 2259 -ne `wc -c <'conf/m-template.h'`; then
- echo shar: \"'conf/m-template.h'\" unpacked with wrong size!
- fi
- # end of 'conf/m-template.h'
- fi
- if test -f 'conf/s-hpux6-5.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'conf/s-hpux6-5.h'\"
- else
- echo shar: Extracting \"'conf/s-hpux6-5.h'\" \(202 characters\)
- sed "s/^X//" >'conf/s-hpux6-5.h' <<'END_OF_FILE'
- X/*
- X * This version is for Hewlett-Packard HP-UX 6.5
- X * Do they really have to screw things up in every release?
- X */
- X
- X#include "s-hpux.h"
- X
- X#define SIGNAL_HANDLERS_ARE_VOID /* */
- X
- X#define EXTRA_LIB -lBSD
- END_OF_FILE
- if test 202 -ne `wc -c <'conf/s-hpux6-5.h'`; then
- echo shar: \"'conf/s-hpux6-5.h'\" unpacked with wrong size!
- fi
- # end of 'conf/s-hpux6-5.h'
- fi
- if test -f 'conf/s-sgi4D.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'conf/s-sgi4D.h'\"
- else
- echo shar: Extracting \"'conf/s-sgi4D.h'\" \(1067 characters\)
- sed "s/^X//" >'conf/s-sgi4D.h' <<'END_OF_FILE'
- X/*
- X * This file is for a Silicon Graphics 4D series machines
- X * running IRIX 3.1 or 3.2.
- X * HAVE_JOBCONTROL should only be defined if you have 3.2.
- X */
- X
- X#include "s-sys5.h"
- X
- X/*
- X * Define if your system has BSD like job control (SIGTSTP works)
- X */
- X
- X#define HAVE_JOBCONTROL /* */
- X
- X/*
- X * Define if your system has a 4.3BSD like syslog library.
- X */
- X
- X#define HAVE_SYSLOG
- X
- X/*
- X * Define HAVE_GETHOSTNAME if your system provides a BSD like
- X * gethostname routine.
- X */
- X
- X#undef HAVE_UNAME
- X#define HAVE_GETHOSTNAME /* System V */
- X
- X/*
- X * Specify the default mailer to be invoked by nnmail
- X */
- X
- X#undef MAILX
- X#define MAILX "/usr/bsd/Mail"
- X
- X/*
- X * Define standard compiler flags here:
- X */
- X
- X#define COMPILER_FLAGS -O -I/usr/include/bsd
- X
- X
- X/*
- X * Define the maximum length of any pathname that may occur
- X */
- X
- X#undef FILENAME
- X#define FILENAME 1024 /* really should be from limits.h */
- X
- X/*
- X * If your system requires other libraries when linking nn
- X * specify them here: (use shared C library for reduced
- X * size and portability across releases).
- X */
- X
- X#define EXTRA_LIB -lbsd -lc_s
- END_OF_FILE
- if test 1067 -ne `wc -c <'conf/s-sgi4D.h'`; then
- echo shar: \"'conf/s-sgi4D.h'\" unpacked with wrong size!
- fi
- # end of 'conf/s-sgi4D.h'
- fi
- if test -f 'conf/s-xenix386.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'conf/s-xenix386.h'\"
- else
- echo shar: Extracting \"'conf/s-xenix386.h'\" \(923 characters\)
- sed "s/^X//" >'conf/s-xenix386.h' <<'END_OF_FILE'
- X/*
- X * Thu Jun 29 18:55:47 1989 - Chip Rosenthal <chip@vector.Dallas.TX.US>
- X * Generated SCO XENIX/386 version from "s-template.h". XENIX has
- X * both "termcap" and "terminfo". This version reflects the local
- X * preference for "termcap".
- X */
- X
- X#define NO_DIRENT_H
- X#include "s-sys5-tcap.h"
- X
- X#undef SIGNAL_HANDLERS_ARE_VOID
- X
- X#define HAVE_DIRECTORY /* */
- X#include <sys/ndir.h> /* SCO XENIX */
- Xtypedef struct direct Direntry; /* BSD and SCO XENIX */
- X
- X#undef HAVE_MKDIR
- X
- X#undef DETATCH_TERMINAL
- X
- X/*
- X * Define AVOID_SHELL_EXEC if the system gets confused by
- X * #!/bin/sh
- X * lines in shell scripts, e.g. only reads #! and thinks it
- X * is a csh script.
- X */
- X
- X#define AVOID_SHELL_EXEC /* */
- X
- X/*
- X * Specify the default mailer to be invoked by nnmail
- X */
- X
- X#undef MAILX
- X#define MAILX "/usr/bin/mail" /* SCO XENIX */
- X
- X/*
- X * If your system requires other libraries when linking nn
- X * specify them here:
- X */
- X
- X#define EXTRA_LIB -lx
- END_OF_FILE
- if test 923 -ne `wc -c <'conf/s-xenix386.h'`; then
- echo shar: \"'conf/s-xenix386.h'\" unpacked with wrong size!
- fi
- # end of 'conf/s-xenix386.h'
- fi
- if test -f 'format.awk' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'format.awk'\"
- else
- echo shar: Extracting \"'format.awk'\" \(2063 characters\)
- sed "s/^X//" >'format.awk' <<'END_OF_FILE'
- XBEGIN {
- X linebuf = indent = ""
- X curcol = indcol = 0
- X maxcol = 78
- X progname = ""
- X firstsh = 1
- X numcol = 0
- X spacing = 1
- X wordspace = " "
- X tab = sprintf("%c",9)
- X}
- X
- X/^\.SH / {
- X if (firstsh == 0) printf("%s\n\n", linebuf)
- X firstsh = 0
- X
- X printf("From: %s\nSubject:", progname);
- X for (i = 2; i <= NF; i++) printf(" %s", $i);
- X printf("\n\n")
- X
- X linebuf = indent = ""
- X curcol = indcol = 0
- X next
- X}
- X
- X/^\.TH / {
- X progname = $2
- X next
- X}
- X
- X/^\.UC / {
- X next
- X}
- X
- X/^\.br/ || /^\.sp/ {
- X if (linebuf != indent) {
- X printf("%s\n", linebuf)
- X }
- X linebuf = indent
- X curcol = indcol
- X next
- X}
- X
- X/^\.PP/ {
- X if (linebuf != indent) printf("%s\n", linebuf)
- X
- X printf("\n")
- X
- X linebuf = " " ; curcol = 3
- X indent = "" ; indcol = 0
- X next
- X}
- X
- X/^\.LP/ {
- X if (linebuf != indent) printf("%s\n", linebuf)
- X
- X printf("\n")
- X
- X linebuf = indent = ""
- X curcol = indcol = 0
- X next
- X}
- X
- X/^\.TP/ {
- X if (linebuf != indent) printf("%s\n", linebuf)
- X
- X printf("\n")
- X
- X getline; linebuf = $0
- X indent = " "
- X curcol = indcol = 5
- X if (length(linebuf) >= 5) {
- X printf("%s\n", linebuf)
- X linebuf = indent
- X } else {
- X while (length(linebuf) < 4) linebuf = linebuf " "
- X }
- X next
- X}
- X
- X/^\.\\"ta/ {
- X for (numcol = 2; numcol <= NF; numcol++) tabcol[numcol-1] = $numcol
- X numcol = NF
- X next
- X}
- X
- X/^\.DT/ {
- X numcol = 0
- X next
- X}
- X
- Xnumcol != 0 {
- X j = length($0)
- X k = 0
- X g = 1
- X for (i = 1; i<=j; i++) {
- X while (k < tabcol[g]) {
- X printf(" ")
- X k++
- X }
- X c = substr($0,i,1)
- X if (c == tab) {
- X g++
- X } else {
- X printf("%s", c)
- X k++
- X }
- X }
- X printf("\n")
- X next
- X}
- X
- X/^[ ]/ {
- X if (linebuf != indent) printf("%s\n",linebuf)
- X linebuf = indent " "
- X curcol = indcol+5
- X}
- X
- X{
- X word = 1
- X wordspace = " "
- X spacing = 1
- X}
- X
- X/^\.[IB] / {
- X word = 2
- X}
- X
- X/^\.[IB]R / {
- X wordspace = ""
- X word = 2
- X spacing = 0
- X}
- X
- X{
- X sep = " "
- X if (linebuf == indent) sep = ""
- X
- X while (word <= NF) {
- X k = length($word)
- X if ((curcol + k) > maxcol) {
- X printf("%s\n", linebuf)
- X linebuf = indent
- X curcol = indcol
- X sep = ""
- X }
- X linebuf = linebuf sep $word
- X sep = wordspace
- X curcol += spacing + k
- X word++
- X }
- X}
- X
- XEND {
- X if (linebuf != indent) printf("%s\n\n", linebuf)
- X}
- END_OF_FILE
- if test 2063 -ne `wc -c <'format.awk'`; then
- echo shar: \"'format.awk'\" unpacked with wrong size!
- fi
- # end of 'format.awk'
- fi
- if test -f 'help/help.extended' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'help/help.extended'\"
- else
- echo shar: Extracting \"'help/help.extended'\" \(1353 characters\)
- sed "s/^X//" >'help/help.extended' <<'END_OF_FILE'
- X;:AEXTENDED COMMANDS;:A
- X
- X:help COMMAND give help on specific command
- X
- X:q! quit nn without updating .newsrc
- X:x quit nn, mark current group as read
- X
- X:! SHELL-COMMAND execute SHELL-COMMAND w/o screen redraw.
- X
- X:admin enter administration mode
- X:bug send a bug report
- X:cd [DIR] change working directory to DIR
- X:compile compile & reload kill file
- X:coredump abort with a core dump
- X:cost show current accounting figures
- X:decode decode uuencoded article(s)
- X:define N ... end define macro N
- X:local VARIABLE [VALUE] make VARIABLE local to current group [and set to VALUE]
- X:man read online manual
- X:map MODE KEY COMMAND remap key or command (use ':help map' for more info)
- X:mkdir [DIR] create directory DIR (will prompt for DIR if omitted)
- X:print print article
- X:pwd print current directory
- X:rmail read incoming mail (no update)
- X:set VARIABLE [VALUE] set or unset variable (use ':help set' for more info)
- X:show groups HOW show group subscriptions etc.
- X:show kill show kill file entries for current group
- X:show map [MAP] show key mappings (MAP = #, key, menu, show)
- X:show rc [GROUP] show (current) GROUPS .newsrc entry
- X:sort [MODE] sort menu according to subject, age, or arrival
- X:toggle VARIABLE toggle boolean variable
- X:unread (N) mark current group as unread (last N articles)
- X:unset VARIABLE clear variable
- X:unshar unshar article(s)
- END_OF_FILE
- if test 1353 -ne `wc -c <'help/help.extended'`; then
- echo shar: \"'help/help.extended'\" unpacked with wrong size!
- fi
- # end of 'help/help.extended'
- fi
- if test -f 'help/help.map' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'help/help.map'\"
- else
- echo shar: Extracting \"'help/help.map'\" \(781 characters\)
- sed "s/^X//" >'help/help.map' <<'END_OF_FILE'
- X;:AMAP COMMAND;:A
- X
- Xmap TABLE show contents of mapping table
- X
- Xmap menu KEY COMMAND map KEY into COMMAND in menu mode
- Xmap show KEY COMMAND map KEY into COMMAND in article presentation mode
- Xmap both KEY COMMAND map KEY into COMMAND in both modes
- Xmap key KEY1 KEY2 map KEY1 into KEY2 (unconditionally)
- Xmap #N CH1 CH2 ... define the input sequence CH1 CH2 ... as special key N
- X
- X;:ASPECIAL FORMS;:A (TABLE = menu, show, both)
- X
- Xmap TABLE KEY1 as KEY2 map KEY1 into the command bound to KEY2
- Xmap TABLE KEY macro N map KEY to invoke macro number N
- Xmap menu KEY article N map KEY to select item number N (base 0) on the menu
- X
- X;:AKEYS;:A
- X
- X0xNN the ascii character NN
- XC the character C
- X^C control-C
- X^? DEL
- X#N special key number N
- X
- Xup, down, left, rigth: the arrow keys
- X
- X;:Chelp.commands
- END_OF_FILE
- if test 781 -ne `wc -c <'help/help.map'`; then
- echo shar: \"'help/help.map'\" unpacked with wrong size!
- fi
- # end of 'help/help.map'
- fi
- if test -f 'help/help.menu' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'help/help.menu'\"
- else
- echo shar: Extracting \"'help/help.menu'\" \(1003 characters\)
- sed "s/^X//" >'help/help.menu' <<'END_OF_FILE'
- X;:ASELECT (toggle);:A ;:AMOVE;:A
- Xa-z0-9 Specified article , Next menu line
- Xx-y Range x to y / Previous menu line
- Xx* Same subject as x SPACE Next menu page (if any)
- X. Current article < > Prev/Next menu page
- X@ ~ Reverse/Undo all selections ^ $ First/Last menu page
- X=regexp Matching subjects (=. selects all)
- XL/JJJJ Leave/Change attributes
- X;:ASHOW SELECTED ARTICLES;:A
- XSPACE Show (only when on last menu page)
- XZ Show NOW, and return to this group afterwards
- XX Show NOW, and continue with next group
- X;:AGOTO OTHER GROUPS;:A
- XX Update current group, skip to next. Y Group overview
- XN P Goto next/previous group. ~/.nn/init:
- XG Goto named group or open a folder. Defines group
- XB A Go back/forward in groups already read. presentation sequence.
- X;:AMISCELLANEOUS;:A
- XU C (Un)subscribe / Cancel :man Online manual
- XF R M Follow-up/Reply/Mail :help More online help
- XS O W Save articles ! Shell escape
- X:post Post new article " Change menu layout
- X:unshar :decode :patch Unpack articles Q Quit nn
- END_OF_FILE
- if test 1003 -ne `wc -c <'help/help.menu'`; then
- echo shar: \"'help/help.menu'\" unpacked with wrong size!
- fi
- # end of 'help/help.menu'
- fi
- if test -f 'help/help.more' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'help/help.more'\"
- else
- echo shar: Extracting \"'help/help.more'\" \(1248 characters\)
- sed "s/^X//" >'help/help.more' <<'END_OF_FILE'
- X;:ASCROLLING;:A ;:AABSOLUTE LINE;:A ;:ASEARCHING;:A
- XSP 1 page forw ^ top /RE find regular expr.
- Xd 1/2 page forw gNUM line NUM . // repeat last search
- XCR 1 line forw $ last line
- XDEL 1 page back h header ;:ATEXT CONVERSIONS;:A
- Xu 1/2 page back H full digest D decrypt article (rot13)
- XTAB skip section c compress spaces
- X;:AGOTO ANOTHER ARTICLE;:A
- XSP next (at end of current article) ;:ACANCEL, SUBSCRIBE, KILL;:A
- Xn, p next/previous article C cancel article
- Xl mark article for later action U (un)subscribe to group
- Xk kill subject (not permanently) K kill/select handling
- X* select subject
- X ;:AQUIT / ESCAPE;:A
- X;:ASAVE;:A = back to menu
- Xs, o, w save with full/short/no header N goto next group
- X:unshar :decode :patch unpack article X as N, mark as read
- X !, ^Z Shell escape, suspend
- X;:AREPLY, POST;:A Q quit nn
- Xr mail reply to author of article
- Xm mail (or forward article) ;:AREDRAW;:A
- Xf post follow-up to article ^P Repeat last message
- X:post post new article ^L, ^R Redraw screen
- END_OF_FILE
- if test 1248 -ne `wc -c <'help/help.more'`; then
- echo shar: \"'help/help.more'\" unpacked with wrong size!
- fi
- # end of 'help/help.more'
- fi
- if test -f 'help/help.sort' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'help/help.sort'\"
- else
- echo shar: Extracting \"'help/help.sort'\" \(880 characters\)
- sed "s/^X//" >'help/help.sort' <<'END_OF_FILE'
- X;:AMENU SORTING MODES AND COMMANDS;:A
- X
- XVariable: sort-mode
- X
- X Determines the default menu sorting method. It is a numeric
- X value corresponding to the modes described below:
- X
- X:sort
- X Sort articles on menu according to current sort-mode.
- X
- X:sort arrival (sort-mode 0)
- X Sort articles in arrival, i.e. article number order.
- X
- X:sort subject (sort-mode 1)
- X Articles are grouped according to subject, each article within
- X a group is sorted according to posting date and time, and
- X the groups are sorted according to the age of the first article
- X in each group.
- X
- X:sort lexical (sort-mode 2)
- X Articles are sorted in lexicographical order on subject.
- X Articles with identical subjects are sorted after age.
- X
- X:sort age (sort-mode 3)
- X Articles ordered after posting date only.
- X
- X:sort sender (sort-mode 4)
- X Articles ordered after sender's name.
- X Articles from same sender are sorted on age.
- END_OF_FILE
- if test 880 -ne `wc -c <'help/help.sort'`; then
- echo shar: \"'help/help.sort'\" unpacked with wrong size!
- fi
- # end of 'help/help.sort'
- fi
- if test -f 'inews/README' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'inews/README'\"
- else
- echo shar: Extracting \"'inews/README'\" \(2391 characters\)
- sed "s/^X//" >'inews/README' <<'END_OF_FILE'
- X
- X This is a "pseudo" inews which allows remote posting using
- Xthe NNTP server. Essentially it takes a bunch of arguments and ignores
- Xones starting with "-", expecting to find at least one which is
- Xa file name. If no files are specified, it uses standard input
- Xas the input file.
- X
- X It then opens a connection to the NNTP server on the remote
- Xmachine and blasts the article across. It then closes the connection.
- XIf it doesn't find a From: or Path: line, it inserts them, in the
- Xdefault format
- X
- X From: login@hostname.DOMAIN (Full_name)
- X Path: hostname!login
- X
- Xwhere DOMAIN is a #define in ./conf.h, and should be changed to reflect
- Xyour system. A good choice is "UUCP" if you are not a member of the
- XInternet. "Full_name" understands the & hack in password files. If
- X"HIDDENNET" is defined in ./conf.h, DOMAIN is used as the complete host
- Xname, and the format used is
- X
- X From: login@DOMAIN (Full_name)
- X Path: login
- X
- X "hostname" is figured out by what you've #defined in ../config.h.
- XIf you have defined GHNAME, it uses the gethostname() call.
- XIf you've defined UUNAME, it figured it out from the file
- X/etc/uucpname. Finally, if neither is defined it gets it from
- X/usr/include/whoami.h. If you have GHNAME defined and your
- Xgethostname() returns your fully-qualified Internet name,
- Xundefine DOMAIN.
- X
- X The point here is that the thing looks like inews to any program
- Xwhich would care to post something (e.g., Pnews, postnews, what have
- Xyou). The difference is that the article will look like it was posted
- Xon the remote end, not on the local end. Please note that "postnews"
- X(nor any of the other standard news programs) is not required for
- Xrrn/nntp on client machines.
- X
- X The "test*" files in this directory provide some good test
- Xmaterial for inews; you can just redirect inews to take input from
- Xthem or whatever.
- X
- X Thanks to Steven Grady <grady@postgres.berkeley.edu> for
- Xwriting this, and for wasting a lot of his valuable time dealing
- Xwith the can-o'-worms that is the real inews.
- X
- XBUGS:
- X
- X This version of inews doesn't handle real inews options. As
- Xa result, some posting programs (notably the Gnumacs front end) will
- Xfail if they use this program. In the interests of simplicity, I
- Xhave no plans for modifying mini-inews to handle real-inews options.
- XHowever, if you'd like to send me diffs I'll be more than happy to
- Xinstall them for the next release.
- END_OF_FILE
- if test 2391 -ne `wc -c <'inews/README'`; then
- echo shar: \"'inews/README'\" unpacked with wrong size!
- fi
- # end of 'inews/README'
- fi
- if test -f 'man/nnpost.1' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'man/nnpost.1'\"
- else
- echo shar: Extracting \"'man/nnpost.1'\" \(1598 characters\)
- sed "s/^X//" >'man/nnpost.1' <<'END_OF_FILE'
- X.TH NNPOST 1 "Release 6.4"
- X.UC 4
- X.SH NAME
- Xnnpost \- post news articles (\fInn\fP)
- X.SH SYNOPSIS
- X.B nnpost
- X[ \-\fBdksy\fP \fIstring\fP ]
- X[ \-\fBf\fP \fIfile\fP ]
- X[ \-\fBp\fP ]
- X[ \fIgroup\fP... ]
- X.SH DESCRIPTION
- X.B nnpost
- Xis used to post new articles using \fInn\fP's normal interface, but
- Xwithout entering \fInn\fP in reading mode.
- X.LP
- XWhen started, it reads the \fIinit\fP file and then directly executes
- X\fInn\fP's \fB:post\fP command.
- X.LP
- XIt will prompt for a (comma-separated) list of news groups, the
- Xarticle subject, a list of keywords, a summary, and the distribution
- Xof the article. Each of these prompts can also be supplied via
- Xcommand line options or arguments as described below.
- X.LP
- XIf a source file is specified with \fB\-f\fP it will be used as the
- Xinitial article body. If the \fB\-p\fP option is also specified, the
- Xarticle is posted directly without editing.
- X.SH OPTIONS
- X.TP
- X\fB\-d\fP \fIdistribution\fP
- XUse the specified \fIdistribution\fP for the article.
- X.TP
- X\fB\-k\fP "\fIkeywords\fP"
- XAssociate the specified \fIkeywords\fP with the article.
- X.sp 0.5v
- X.TP
- X\fB\-s\fP "\fIsubject\fP"
- XUse the specified \fIsubject\fP for the new article.
- X.TP
- X\fB\-y\fP "\fIsummary\fP"
- XInclude the given \fIsummary\fP in the article header.
- X.TP
- X\fB\-f\fP \fIfile\fP
- XRead the article \fIbody\fP from the specified file.
- X.TP
- X\fB\-p\fP
- XPost the article specified with \fB\-f\fP without editing.
- X.SH FILES
- X.DT
- X.ta \w'~/.nn/init'u+3m
- X.\"ta 0 12
- X~/.nn/init The control variables for \fInnpost\fP.
- X.DT
- X.SH SEE ALSO
- Xnn(1)
- X.SH AUTHOR
- XKim F. Storm, Texas Instruments A/S, Denmark
- X.br
- XE-mail: storm@texas.dk
- X
- END_OF_FILE
- if test 1598 -ne `wc -c <'man/nnpost.1'`; then
- echo shar: \"'man/nnpost.1'\" unpacked with wrong size!
- fi
- # end of 'man/nnpost.1'
- fi
- if test -f 'man/nnspew.8' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'man/nnspew.8'\"
- else
- echo shar: Extracting \"'man/nnspew.8'\" \(1242 characters\)
- sed "s/^X//" >'man/nnspew.8' <<'END_OF_FILE'
- X.TH NNSPEW 8 "Release 6.4"
- X.UC 4
- X.SH NAME
- Xnnspew \- subject database manager (nn)
- X.SH SYNOPSIS
- X.B nnspew
- X.SH DESCRIPTION
- X\fInnspew\fP builds a sorted database of all available subjects in the
- X\fInn\fP article database for fast access via the \fInngrab\fP utility.
- X.LP
- X\fInnspew\fP should be activated regularly to rebuild the subject
- Xdatabase, e.g. by \fIcron\fP. For example:
- X.sp 0.5v
- X 2 6,9,12,15,18,21 * * * root /bin/nice /usr/lib/nn/nnspew
- X.LP
- XCross posted articles are only represented in the database once, and
- Xidentical subjects in each group are merged into one to use a minimum
- Xof disk space. This saves about 50% of the disk space otherwise
- Xrequired.
- X.SH FILES
- X.DT
- X.ta \w'$db/subjects'u+3m
- X.\"ta 0 16
- X$db/subjects subject database
- X.DT
- X.SH SEE ALSO
- Xnn(1), nnspew(8), egrep(1)
- X.SH NOTES
- X\fInngrap\fP will use the subject database generated by \fInnspew\fP
- Xindependent of its age. Thus, if you stop running \fInnspew\fP,
- Xremember to remove the subjects file as well.
- X.SH BUGS
- X\fInnmaster\fP should automatically append new articles to the subject
- Xdatabase to keep it up-to-date, and thus require less frequent
- Xrebuilding using \fInnspew\fP.
- X.SH AUTHOR
- XJames A. Woods, NASA Ames Research Center
- X.br
- XE-mail: jaw@ames.arc.nasa.gov
- END_OF_FILE
- if test 1242 -ne `wc -c <'man/nnspew.8'`; then
- echo shar: \"'man/nnspew.8'\" unpacked with wrong size!
- fi
- # end of 'man/nnspew.8'
- fi
- if test -f 'man/nnstats.1m' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'man/nnstats.1m'\"
- else
- echo shar: Extracting \"'man/nnstats.1m'\" \(1572 characters\)
- sed "s/^X//" >'man/nnstats.1m' <<'END_OF_FILE'
- X.TH NNSTATS 1M "Release 6.4"
- X.\" (c) Copyright 1988, 1990, Kim F. Storm. All rights reserved.
- X.UC 4
- X.SH NAME
- Xnnstats \- display \fInnmaster\fP collection and expire statistics
- X.SH SYNOPSIS
- X.B nnstats
- X[ \-\fBlt\fP ]
- X[ \-\fBd\fP \fImonth\fP \fIday\fP ]
- X[ \-\fBm\fP \fImonth\fP ]
- X[ \fIlogfile\fP ]...
- X.SH DESCRIPTION
- X.I nnstats
- Xwill extract the collection (C) and expiration (X) entries from the
- Xlog file and calculate total and average number of articles, groups
- Xand elapsed time per day, per month, or for the duration of the whole
- Xlog file.
- X.LP
- XNormally only a summary for the specified period is printed. If
- X\-\fBl\fP is specified, the statistics for each day in the period is
- Xalso printed, and if \-\fBt\fP is specified the summary is not
- Xprinted.
- X.LP
- XNormally the statistics is collected for all days in the log files (or
- Xthe current log file if one is not specified).
- X.LP
- XIf "\-\fBm\fP \fImonth\fP" is specified, the statistics for that month
- Xis calculated. The \fImonth\fP is specified in normal \fIdate\fP
- Xnotation, i.e. a capitalized three letter abbreviation like Jan, Feb, ...
- X.LP
- XIf "\-\fBd\fP \fImonth\fP \fIday\fP" is specified, the statistics for
- Xthat date only is calculated and printed.
- X.SH FILES
- X.DT
- X.ta \w'.../Log'u+3m
- X.\"ta 0 20
- X.../Log The log file
- X.DT
- X.SH SEE ALSO
- Xnn(1), nnusage(1M), nnadmin(1M), nnmaster(8)
- X.SH NOTES
- XIf \fInnmaster\fP is run with options \-\fBL\fPCX, \fInnstats\fP will
- Xnot work, because the necessary entries are not written to the log file.
- X.SH AUTHORS
- XMark Moraes <moraes@csri.toronto.edu>
- X.br
- XKim F. Storm <storm@texas.dk>
- X
- X
- END_OF_FILE
- if test 1572 -ne `wc -c <'man/nnstats.1m'`; then
- echo shar: \"'man/nnstats.1m'\" unpacked with wrong size!
- fi
- # end of 'man/nnstats.1m'
- fi
- if test -f 'man/nntidy.1' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'man/nntidy.1'\"
- else
- echo shar: Extracting \"'man/nntidy.1'\" \(2215 characters\)
- sed "s/^X//" >'man/nntidy.1' <<'END_OF_FILE'
- X.TH NNTIDY 1 "Release 6.4"
- X.\" (c) Copyright 1988, 1990, Kim F. Storm. All rights reserved.
- X.UC 4
- X.SH NAME
- Xnntidy \- tidy your personal .newsrc file
- X.SH SYNOPSIS
- X.B nntidy
- X[ \-\fBaciNQrsuv\fP ] [ group ]...
- X.SH DESCRIPTION
- X.B nntidy
- Xwill clean out non-existing groups, adjust obviously wrong article
- Xnumbers, and remove badly formed lines from your .newsrc file.
- X.LP
- XIt may optionally remove ignored groups, unsubscribed groups, and
- Xgroups which are not part of your presentation sequence or the groups
- Xspecified on the command line.
- X.LP
- XYou should run
- X.B nntidy
- Xif your rc file has been corrupted for some reason.
- X.SH OPTIONS
- X.TP
- X.B \-a
- XEquivalent to
- X.B \-cisu.
- X.TP
- X.B \-c
- XRemove unrecognized lines. This will also remove the `options' line
- Xused by some older news readers, such as
- X.BR readnews (1)
- X.TP
- X.B \-i
- XRemove entries for groups which are ignored in the database, e.g.
- Xentries marked with `X' in the GROUPS file.
- X.TP
- X.B \-r
- XRemove entries for unsubscribed groups.
- X.TP
- X.B \-s
- XRemove entries which are not included in the group presentation
- Xsequence defined in the init file. If one or more groups are
- Xspecified on the command line, entries not matched by these groups
- X(and their subgroups etc) will be removed.
- X.sp 0.5v
- XNotice that depending on how you construct the presentation sequence,
- Xthis may cause unsubscribed groups to be removed from .newsrc, but
- Xthis will not normally happen.
- X.TP
- X.B \-u
- XTruncate entries for unsubscribed groups, by removing the article
- Xnumbers and leaving only the news group name and the `!' mark.
- X.TP
- X.B \-v
- XVerbose operation. Reports each change made to the .newsrc file.
- X.TP
- X.B \-N
- XNo update mode. The requested operations are performed, but the
- Xresult is not written back to disk. This can be used with the
- X.B \-v
- Xoption to see whether tidying is required.
- X.TP
- X.B \-Q
- XQuiet operation. The version information is not printed.
- X.SH FILES
- X.DT
- X.ta \w'~/.newsrc.tidy'u+3m
- X.\"ta 0 20
- X~/.newsrc The record of read articles
- X.br
- X~/.newsrc.tidy The original rc file before tidy
- X.DT
- X.SH SEE ALSO
- Xnn(1), nncheck(1), nngoback(1), nngrep(1)
- X.br
- Xnnadmin(1M), nnquery(1M), nnusage(1M), nnmaster(8)
- X.SH AUTHOR
- XKim F. Storm, Texas Instruments A/S, Denmark
- X.br
- XE-mail: storm@texas.dk
- X
- X
- END_OF_FILE
- if test 2215 -ne `wc -c <'man/nntidy.1'`; then
- echo shar: \"'man/nntidy.1'\" unpacked with wrong size!
- fi
- # end of 'man/nntidy.1'
- fi
- if test -f 'man/nnusage.1m' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'man/nnusage.1m'\"
- else
- echo shar: Extracting \"'man/nnusage.1m'\" \(1194 characters\)
- sed "s/^X//" >'man/nnusage.1m' <<'END_OF_FILE'
- X.TH NNUSAGE 1M "Release 6.4"
- X.\" (c) Copyright 1988, 1990, Kim F. Storm. All rights reserved.
- X.UC 4
- X.SH NAME
- Xnnusage \- display \fInn\fP usage statistics
- X.SH SYNOPSIS
- X.B nnusage
- X[ -t ]
- X.SH DESCRIPTION
- X.B nnusage
- Xwill extract the usage entries from the log file and calculate the
- Xtotal usage time for each \fInn\fP user.
- X.LP
- XWithout options, the output will be sorted according to user names.
- X.LP
- XWith the \-t option, \fInnusage\fP will list the users ordered after
- Xthe total usage time.
- X.LP
- XSince it is possible to
- Xsuspend
- X\fInn\fP, or leave the terminal while \fInn\fP is active, \fInn\fP
- Xtries to be intelligent when it calculates the usage time so it will
- Xtruly report the actual time spent on news reading.
- X.SH FILES
- X.DT
- X.ta \w'.../Log'u+3m
- X.\"ta 0 20
- X.../Log The log file
- X.DT
- X.SH SEE ALSO
- Xnn(1), nncheck(1), nngoback(1), nngrep(1), nntidy(1)
- X.br
- Xnnadmin(1M), nnquery(1M), nnmaster(8)
- X.SH NOTES
- XThe \fInn\fP package must have been compiled with the STATISTICS
- Xoption turned on to produce the usage entries in the log file.
- X.LP
- XOnly \fInn\fP sessions longer than 5 minutes are registered in the log file.
- X.SH AUTHOR
- XKim F. Storm, Texas Instruments A/S, Denmark
- X.br
- XE-mail: storm@texas.dk
- X
- X
- END_OF_FILE
- if test 1194 -ne `wc -c <'man/nnusage.1m'`; then
- echo shar: \"'man/nnusage.1m'\" unpacked with wrong size!
- fi
- # end of 'man/nnusage.1m'
- fi
- if test -f 'menu.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'menu.h'\"
- else
- echo shar: Extracting \"'menu.h'\" \(2211 characters\)
- sed "s/^X//" >'menu.h' <<'END_OF_FILE'
- X/*
- X * (c) Copyright 1990, Kim Fabricius Storm. All rights reserved.
- X *
- X * Various module return codes.
- X */
- X
- X/* menu commands */
- X
- X#define ME_QUIT 0 /* quit nn */
- X#define ME_NEXT 1 /* continue to next group */
- X#define ME_PREV 3 /* previous group */
- X#define ME_NO_ARTICLES 4 /* no articles in group */
- X#define ME_REDRAW 5 /* redraw screen after return */
- X#define ME_NO_REDRAW 6 /* screen is not corrupted */
- X#define ME_REENTER_GROUP 7 /* reenter after .newsrc update */
- X
- X
- X/* more commands */
- X
- X#define MC_QUIT 0 /* quit nn */
- X#define MC_NEXT 1 /* next article */
- X#define MC_MENU 2 /* return to menu */
- X#define MC_PREV 3 /* previous article */
- X#define MC_NEXTSUBJ 4 /* show next subject */
- X#define MC_ALLSUBJ 5 /* show all with same subject */
- X#define MC_NEXTGROUP 6 /* next group, no read */
- X#define MC_READGROUP 7 /* next group, mark as read */
- X#define MC_PREVIEW_NEXT 8 /* preview next article */
- X#define MC_PREVIEW_OTHER 9 /* preview another article */
- X#define MC_REDRAW 10 /* redraw screen after return */
- X#define MC_NO_REDRAW 11 /* screen is not corrupted */
- X#define MC_BACK_ART 12 /* back one article (don't deselect cur) */
- X#define MC_FORW_ART 13 /* forward one article (deselect cur) */
- X#define MC_DO_KILL 14 /* did kill-select kill */
- X#define MC_DO_SELECT 15 /* did kill-select selection */
- X#define MC_REENTER_GROUP 16 /* reenter after .newsrc update */
- X
- X/* more modes */
- X
- X#define MM_NORMAL 0x0000 /* show article */
- X#define MM_DIGEST 0x0001 /* show full digest */
- X#define MM_PREVIOUS 0x0010 /* previous article exists */
- X#define MM_LAST_SELECTED 0x0020 /* last selected article in group */
- X#define MM_LAST_GROUP 0x0040 /* last group */
- X#define MM_PREVIEW 0x0080 /* preview mode flag */
- X#define MM_FIRST_ARTICLE 0x0100 /* first article in group */
- X#define MM_LAST_ARTICLE 0x0200 /* last article in group */
- X
- X/* alt_command return values */
- X
- X#define AC_QUIT 0 /* quit nn */
- X#define AC_PROMPT 1 /* just redraw prompt line */
- X#define AC_REDRAW 2 /* redraw screen */
- X#define AC_REORDER 3 /* articles have been reordered */
- X#define AC_REENTER_GROUP 4 /* reenter group after .newsrc update */
- X#define AC_KEYCMD 5 /* alt_cmd_key contains command */
- X#define AC_UNCHANGED 6 /* no display changes */
- END_OF_FILE
- if test 2211 -ne `wc -c <'menu.h'`; then
- echo shar: \"'menu.h'\" unpacked with wrong size!
- fi
- # end of 'menu.h'
- fi
- if test -f 'news.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'news.h'\"
- else
- echo shar: Extracting \"'news.h'\" \(2301 characters\)
- sed "s/^X//" >'news.h' <<'END_OF_FILE'
- X/*
- X * (c) Copyright 1990, Kim Fabricius Storm. All rights reserved.
- X *
- X * Interface for decoding article headers.
- X */
- X
- Xstruct news_header {
- X
- X int ng_flag; /* flags: */
- X# define N_DIGEST 1 /* article is part of a digest*/
- X# define N_MODERATED 2 /* group is moderated */
- X
- X off_t ng_fpos; /* position of article text */
- X off_t ng_lpos; /* last text offset
- X /* header lines: */
- X char *ng_from; /* from */
- X char *ng_name; /* senders name */
- X char *ng_subj; /* subject */
- X char *ng_groups; /* newsgroups */
- X char *ng_path; /* path */
- X char *ng_reply; /* reply-to */
- X char *ng_ident; /* message id */
- X char *ng_follow; /* followup to */
- X char *ng_ref; /* references */
- X char *ng_keyw; /* keywords */
- X char *ng_dist; /* distibution */
- X char *ng_org; /* organization */
- X char *ng_appr; /* approved */
- X char *ng_summ; /* summary */
- X
- X char *ng_date; /* date */
- X
- X char *ng_rdate; /* date-received (News 3) */
- X char *ng_bref; /* back-references (News 3) */
- X
- X char *ng_xlines; /* lines (from header) */
- X int ng_lines; /* lines (decoded) */
- X} news;
- X
- X
- X/*
- X * digest article subheader
- X */
- X
- Xstruct digest_header {
- X off_t dg_hpos; /* position of article header */
- X off_t dg_fpos; /* position of article text */
- X off_t dg_lpos; /* last text position */
- X /* header lines: */
- X char *dg_date; /* date */
- X char *dg_from; /* from */
- X char *dg_subj; /* subject */
- X char *dg_to; /* to */
- X
- X int dg_lines; /* lines (pseudo field) */
- X} digest;
- X
- X
- X#define NEWS_HEADER_BUFFER 2048
- X
- Xtypedef char news_header_buffer[NEWS_HEADER_BUFFER];
- X
- X
- XFILE *open_news_article(/* header, modes [, buffer1 [, buffer2]] */);
- X
- X/* modes */
- X
- X#define FILL_NEWS_HEADER 0x0001 /* parse first header -> buffer1 */
- X#define FILL_DIGEST_HEADER 0x0002 /* parse second header -> buffer[12] */
- X
- X
- X#define GET_ALL_FIELDS 0x0010 /* get all fields (otherwise only */
- X /* name, subj, groups, lines */
- X
- X#define GET_DATE_ONLY 0x0020 /* get Date field */
- X
- X#define FILL_OFFSETS 0x0080 /* fill ng_[hfl]pos */
- X
- X
- X#define DIGEST_CHECK 0x0100 /* set N_DIGEST if "digest" in subj */
- X /* only valid with FILL_NEWS_HEADER */
- X#define LAZY_BODY 0x0200 /* nntp: get body only for digests */
- X
- X
- X#define SKIP_HEADER 0x1000 /* position after (sub) header */
- X
- END_OF_FILE
- if test 2301 -ne `wc -c <'news.h'`; then
- echo shar: \"'news.h'\" unpacked with wrong size!
- fi
- # end of 'news.h'
- fi
- if test -f 'nnmail.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'nnmail.c'\"
- else
- echo shar: Extracting \"'nnmail.c'\" \(1469 characters\)
- sed "s/^X//" >'nnmail.c' <<'END_OF_FILE'
- X/*
- X * (c) Copyright 1990, Kim Fabricius Storm. All rights reserved.
- X *
- X * nnmail - a mailer that understands @ addressing
- X * when you don't have sendmail or smail
- X */
- X
- X#include "config.h"
- X
- X#include "options.h"
- X
- Xchar * MAILER = MAILX;
- Xstatic int print_vers, test_mode;
- X
- XOption_Description( mail_options ) {
- X
- X 'v', Bool_Option( print_vers ),
- X 'm', String_Option( MAILER ),
- X 't', Bool_Option( test_mode ),
- X
- X '\0',
- X};
- X
- X
- Xmain(argc, argv)
- Xint argc;
- Xchar **argv;
- X{
- X int i, n;
- X char route[512];
- X char *getenv(), *envmail;
- X extern char **environ;
- X
- X if (envmail = getenv("NNMAILER"))
- X MAILER = envmail;
- X
- X n = parse_options(argc, argv, (char *)NULL,
- X mail_options, (char *)NULL, NULL_FCT);
- X
- X if (print_vers) {
- X printf("Release %s\n", version_id);
- X nn_exit(0);
- X }
- X
- X#ifndef HAVE_ROUTING
- X if (test_mode) {
- X extern FILE *route_trace;
- X route_trace = stdout;
- X }
- X#endif
- X
- X argv[0] = MAILER;
- X
- X#ifndef HAVE_ROUTING
- X for (i = 1; i <= n; i++)
- X if (reroute(route, argv[i])) {
- X if (test_mode) {
- X printf("%s \t--> %s\n", argv[i], route);
- X continue;
- X }
- X argv[i] = newstr(strlen(route)+1);
- X strcpy(argv[i], route);
- X } else
- X if (test_mode)
- X printf("%s \t*** no route found\n", argv[i]);
- X#endif
- X
- X if (test_mode) nn_exit(0);
- X
- X execve(MAILER, argv, environ);
- X fprintf(stderr, "Mailer '%s' not found\n", MAILER);
- X nn_exit(7);
- X}
- X
- X
- X/*VARARGS*/
- Xuser_error()
- X{
- X}
- X
- Xnn_exit(n)
- X{
- X exit(n);
- X}
- X
- Xsuspend_nn()
- X{
- X}
- END_OF_FILE
- if test 1469 -ne `wc -c <'nnmail.c'`; then
- echo shar: \"'nnmail.c'\" unpacked with wrong size!
- fi
- # end of 'nnmail.c'
- fi
- if test -f 'options.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'options.h'\"
- else
- echo shar: Extracting \"'options.h'\" \(2329 characters\)
- sed "s/^X//" >'options.h' <<'END_OF_FILE'
- X/*
- X * (c) Copyright 1990, Kim Fabricius Storm. All rights reserved.
- X *
- X * Include file for generic option parsing
- X */
- X
- X/*
- X * To use this routine, you must a table called an Option_Description.
- X * Each element in this table describes one possible option:
- X * Its option letter
- X * Its argument type (if any)
- X * Whether an argument is mandatory or optional
- X * The address of the variable holding the option value
- X * The defualt value if argument is optional
- X *
- X * Example:
- X *
- X * A program accepts the following options:
- X * -a [no value]
- X * -b N [a numeric value]
- X * -p [N] [an optional numeric value]
- X * -t S [a string value]
- X *
- X * The corresponding option description table would then look like:
- X *
- X * #include <options.h>
- X * int a_flg = 1, b_value = 0, p_value = 0;
- X * char *t_string = "default";
- X *
- X * Option_Description( options ) {
- X * 'a', Bool_Option(a_flg),
- X * 'b', Int_Option(b_value),
- X * 'p', Int_Option_Optional(p_value, -1),
- X * 't', String_Option(t_string),
- X * '\0',
- X * }
- X * To parse the argument list - and the contents of the environment variable
- X * XXINIT, all that has to be done is to issue the following call:
- X *
- X * files = parse_options(argc, argv, "XXINIT", options, NULL);
- X *
- X * If no environment variable is associated with the program, use NULL as
- X * the third parameter.
- X *
- X * Upon return, the elements argv[1] .. argv[files] will contain
- X * the file names (and other 'non-options') that occur in the argument list.
- X *
- X * The last NULL argument may be replaced by your own 'usage routine'
- X * which will be called in the following way:
- X *
- X * usage(pname)
- X * char *pname; /+ argv[0] without path +/
- X *
- X *
- X * char *program_name(argv)
- X *
- X * return a pointer to the last component of argv[0] (the program name with
- X * with the path deleted).
- X *
- X
- X */
- X
- X
- Xstruct option_descr {
- X char option_letter;
- X char option_type;
- X char ** option_address;
- X char * option_default;
- X} ;
- X
- X
- X#define Option_Description(name) \
- X struct option_descr name[] =
- X
- X#define Bool_Option(addr) \
- X 1, (char **)(&addr), (char *)0
- X
- X#define String_Option(addr) \
- X 2, &addr, (char *)0
- X
- X#define String_Option_Optional(addr, default) \
- X 3, &addr, default
- X
- X#define Int_Option(addr) \
- X 4, (char **)(&addr), (char *)0
- X
- X#define Int_Option_Optional(addr, default) \
- X 5, (char **)(&addr), (char *)default
- END_OF_FILE
- if test 2329 -ne `wc -c <'options.h'`; then
- echo shar: \"'options.h'\" unpacked with wrong size!
- fi
- # end of 'options.h'
- fi
- if test -f 'pack_subject.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'pack_subject.c'\"
- else
- echo shar: Extracting \"'pack_subject.c'\" \(1415 characters\)
- sed "s/^X//" >'pack_subject.c' <<'END_OF_FILE'
- X/*
- X * (c) Copyright 1990, Kim Fabricius Storm. All rights reserved.
- X *
- X * Pack subject by eliminating RE prefixes and - (nf) suffixes.
- X * Also collapse multiple blanks into single blanks.
- X */
- X
- X#include "config.h"
- X
- Xpack_subject(dest, src, re_counter_ptr, max_length)
- Xregister char *dest, *src;
- Xint *re_counter_ptr, max_length;
- X{
- X int re;
- X char *start_dest;
- X register char *max_dest;
- X
- X re = 0;
- X start_dest = dest;
- X
- X if (src) {
- X max_dest = dest + max_length;
- X
- X while (*src) {
- X if (isspace(*src)) {
- X src++;
- X continue;
- X }
- X
- X /* count and remove 'Re: Re: ...' */
- X
- X if (*src != 'R' && *src != 'r') break;
- X *dest++ = *src++;
- X
- X if (*src != 'e' && *src != 'E') break;
- X *dest++ = *src++;
- X
- X if (*src == ':' || *src == ' ') {
- X src++;
- X dest = start_dest;
- X re++;
- X continue;
- X }
- X
- X if (*src != '^') break;
- X
- X src++;
- X dest = start_dest;
- X
- X while (isdigit(*src)) *dest++ = *src++;
- X if (dest == start_dest)
- X re++;
- X else {
- X *dest = NUL;
- X dest = start_dest;
- X re += atoi(dest);
- X }
- X if (*src == ':') src++;
- X }
- X
- X while (*src && dest < max_dest) {
- X if (*src == '-' && strncmp("- (nf)", src, 5) == 0) break;
- X if (isascii(*src) && isspace(*src)) {
- X do src++;
- X while (isascii(*src) && isspace(*src));
- X *dest++ = SP;
- X } else
- X *dest++ = *src++;
- X }
- X }
- X
- X *dest = NUL;
- X *re_counter_ptr = (char)re;
- X
- X return dest - start_dest;
- X}
- END_OF_FILE
- if test 1415 -ne `wc -c <'pack_subject.c'`; then
- echo shar: \"'pack_subject.c'\" unpacked with wrong size!
- fi
- # end of 'pack_subject.c'
- fi
- if test -f 'proto.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'proto.h'\"
- else
- echo shar: Extracting \"'proto.h'\" \(1061 characters\)
- sed "s/^X//" >'proto.h' <<'END_OF_FILE'
- X/*
- X * (c) Copyright 1990, Kim Fabricius Storm. All rights reserved.
- X *
- X * Master/slave communication and locking.
- X */
- X
- X/*
- X * proto_lock() modes
- X */
- X
- X#define PL_SET 1 /* set lock (if not set) */
- X#define PL_SET_WAIT 2 /* set lock (wait until set) */
- X#define PL_SET_QUICK 3 /* as _WAIT, but using sleep(1) */
- X#define PL_CLEAR 4 /* clear lock */
- X#define PL_CLEAR_WAIT 5 /* wait for lock to disappear */
- X#define PL_CHECK 6 /* check running status */
- X#define PL_WAKEUP 7 /* send wakeup (must succeed) */
- X#define PL_WAKEUP_SOFT 8 /* send wakeup (may fail) */
- X#define PL_TERMINATE 9 /* send termination */
- X#define PL_TRANSFER 10 /* transfer lock to current process (forked) */
- X
- X/*
- X * types for send_master(type, group, opt, arg)
- X */
- X
- X#define SM_SET_OPTION 'O' /* set option to arg (toggle if -1) */
- X#define SM_SET_FLAG 'F' /* opt=set/clear flag 'arg' in group */
- X#define SM_RECOLLECT 'R' /* recollect group (or all groups if NULL) */
- X#define SM_EXPIRE 'X' /* expire group (or all groups if NULL) */
- X#define SM_SCAN_ONCE 'U' /* scan unconditionally (ignore active) */
- END_OF_FILE
- if test 1061 -ne `wc -c <'proto.h'`; then
- echo shar: \"'proto.h'\" unpacked with wrong size!
- fi
- # end of 'proto.h'
- fi
- if test -f 'routes.sample' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'routes.sample'\"
- else
- echo shar: Extracting \"'routes.sample'\" \(1952 characters\)
- sed "s/^X//" >'routes.sample' <<'END_OF_FILE'
- X# This file is read from the beginning until a match for a specific
- X# domain/site pair is found. Initially all lines applies to all
- X# domains and hosts. (NOTICE: we use domain == top-level domain)
- X#
- X# In the following list of requests, <host name> is the name of the
- X# LOCAL host, <domain> and <site> is the receivers domain and site.
- X#
- X# /L <domain> local domain name(s), implies /D <domain> command
- X# /H <local host> following lines only applies to specified local host
- X# /H following lines applies to all hosts
- X# /N <site> site is neighbour to local host (+prefix)
- X# /D <domain> following lines applies to specified domain only
- X# /D following lines applies to all domains
- X# /P <prefix> <prefix> is prefixed to the generated address
- X# /B <pattern> address to use for multi-hop bang addresses
- X# /G <pattern> default address pattern
- X# <site> <pattern> address patterns used to reach given site
- X#
- X# The <domain>, <host>, and <site> specifications can be a comma-separated
- X# list of domain, host, or site names (without spaces).
- X#
- X# Address patterns are copied directly to the generated address, except
- X# that the following sequences are substituted:
- X# %n name of receiver
- X# %s receiver's site (with top-level domain stripped off)
- X# %d receiver's top-level domain
- X# %b first N-1 sites from N multi-hop bang address
- X# %p drop <preix> if one is specified
- X# %% a % character
- X#
- X# Default rules:
- X# %n@local-host.local-domain -> %p%n
- X# %n@neighbour-host.remote-domain -> %s.%d!%n
- X#
- X# Example configuration (AmbraSoft A/S, September 1987):
- X#
- X# Backbone: dkuug.dk
- X# |
- X# In-house: olamb.dk---- ambush.dk ------ ambra.dk
- X# / | \
- X# Direct: oldk1.dk oldk2.dk olgb1.uucp(=olgb1.oliv.co.uk)
- X#
- X# This file can be used unchanged on all in-house systems.
- X
- X/L dk,uucp
- X
- X/H ambra,olamb
- X/N ambush
- X/P ambush!
- X
- X/H
- X/N dkuug
- X/N ambra,olamb
- X/N oldk1,oldk2
- X
- X/L uucp
- X/N olgb1
- X
- X/D uk
- Xolgb1.oliv.co olgb1!%n
- X
- X/D
- X
- X/P+ dkuug!
- X
- X/B %b!%s!%n
- X/G %s.%d!%n
- END_OF_FILE
- if test 1952 -ne `wc -c <'routes.sample'`; then
- echo shar: \"'routes.sample'\" unpacked with wrong size!
- fi
- # end of 'routes.sample'
- fi
- if test -f 'term.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'term.h'\"
- else
- echo shar: Extracting \"'term.h'\" \(1313 characters\)
- sed "s/^X//" >'term.h' <<'END_OF_FILE'
- X/*
- X * (c) Copyright 1990, Kim Fabricius Storm. All rights reserved.
- X *
- X * Terminal interface definitions.
- X */
- X
- X
- X
- Xextern init_term();
- Xextern home();
- Xextern gotoxy();
- Xextern clrdisp(), clrpage();
- Xextern clrline();
- X
- Xextern so_gotoxy(), so_printf(), so_end();
- X
- Xextern no_raw(), raw(), unset_raw();
- X
- Xextern int Lines, Columns;
- Xextern int cookie_size;
- Xextern int WRAP, STANDOUT;
- X
- Xextern char *get_s();
- X
- X#define NONE (char *)NULL /* no default string etc. */
- X
- X#define GET_S_BUFFER 256 /* if caller want to reuse get_s buffer */
- X
- Xextern get_c();
- X
- X/* special keys returned by get_c() */
- X
- X#define K_interrupt CONTROL_('G')
- X
- X#define K_up_arrow 0x0081
- X#define K_down_arrow 0x0082
- X#define K_left_arrow 0x0083
- X#define K_right_arrow 0x0084
- X
- X#define K_function(n) (0x0085 + n)
- X
- X
- X#define GETC_COMMAND 0x4000 /* bit set by get_c to return a command */
- X
- X
- X/*
- X * prompt_line = ...
- X * prompt( [P_COMMAND], ] [ format [, arg1 ... , arg4] ] );
- X *
- X * P_MOVE: just move to prompt line
- X * P_REDRAW: redraw prompt
- X * P_VERSION: print version on prompt line
- X */
- X
- X
- Xextern prompt();
- X
- Xint prompt_line; /* prompt line */
- X
- X#define P_MOVE (char *)1
- X#define P_REDRAW (char *)5
- X#define P_VERSION (char *)9
- X#define P_SAVE (char *)13
- X#define P_RESTORE (char *)17
- X
- Xextern display_file();
- X
- X#define CLEAR_DISPLAY 0x01
- X#define CONFIRMATION 0x02
- END_OF_FILE
- if test 1313 -ne `wc -c <'term.h'`; then
- echo shar: \"'term.h'\" unpacked with wrong size!
- fi
- # end of 'term.h'
- fi
- if test -f 'vararg.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'vararg.h'\"
- else
- echo shar: Extracting \"'vararg.h'\" \(1183 characters\)
- sed "s/^X//" >'vararg.h' <<'END_OF_FILE'
- X/*
- X * (c) Copyright 1990, Kim Fabricius Storm. All rights reserved.
- X *
- X * Semi-faked varargs feature
- X */
- X
- X#ifdef HAVE_VARARGS
- X#undef NO_VARARGS
- X#endif
- X
- X#ifdef NO_VARARGS
- X
- X#define va_alist zZa, zZb, zZc, zZd, zZe, zZf, zZg, zZh
- X#define va_dcl char *zZa, *zZb, *zZc, *zZd, *zZe, *zZf, *zZg, *zZh;
- X
- X#define va_arg1(type) (type)zZa
- X#define va_arg2(type) (type)zZb
- X#define va_arg3(type) (type)zZc
- X#define va_args1toN zZa, zZb, zZc, zZd, zZe, zZf, zZg, zZh
- X#define va_args2toN zZb, zZc, zZd, zZe, zZf, zZg, zZh
- X#define va_args3toN zZc, zZd, zZe, zZf, zZg, zZh
- X#define va_args4toN zZd, zZe, zZf, zZg, zZh
- X
- X#define vsprintf sprintf
- X#define vprintf printf
- X
- X#define use_vararg
- X#define start_vararg
- X#define end_vararg
- X
- X#define va_tail va_alist
- X#define va_tdcl va_dcl
- X
- X#else
- X
- X#include <varargs.h>
- X
- X#define va_tail zZap
- X#define va_tdcl va_list va_tail;
- X
- X#define use_vararg va_list zZap
- X#define start_vararg va_start(zZap)
- X#define end_vararg va_end(zZap)
- X
- X#define va_arg1(type) va_arg(zZap, type)
- X#define va_arg2(type) va_arg(zZap, type)
- X#define va_arg3(type) va_arg(zZap, type)
- X#define va_args1toN zZap
- X#define va_args2toN zZap
- X#define va_args3toN zZap
- X#define va_args4toN zZap
- X
- X#endif
- X
- X
- END_OF_FILE
- if test 1183 -ne `wc -c <'vararg.h'`; then
- echo shar: \"'vararg.h'\" unpacked with wrong size!
- fi
- # end of 'vararg.h'
- fi
- echo shar: End of archive 21 \(of 22\).
- cp /dev/null ark21isdone
- MISSING=""
- for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 22 archives.
- rm -f ark[1-9]isdone ark[1-9][0-9]isdone
- else
- echo You still must unpack the following archives:
- echo " " ${MISSING}
- fi
- exit 0
-
- exit 0 # Just in case...
-